package com.rjkj.medicalwaste

import android.app.Application
import android.content.Context
import android.util.Log
import com.inuker.bluetooth.library.BluetoothContext
import com.rjkj.medicalwaste.uncaught.AppException
import com.rjkj.medicalwaste.uncaught.AppExceptionHandle



class MWApplication : Application() {
    private val TAG: String = "MWApplication"
    companion object {
        private var mwApplication:MWApplication? = null
        fun getApp():MWApplication{
            return  mwApplication!!
        }
    }
    //    lateinit var bluetoothSPP: BluetoothSPP
    override fun attachBaseContext(base: Context?) {
        Log.e(TAG, "attachBaseContext: ")
        val startTime = System.currentTimeMillis()
        super.attachBaseContext(base)
        val endTime = System.currentTimeMillis()
        Log.e(TAG, "attachBaseContext: " + (startTime - endTime))
    }

    override fun onCreate() {
        super.onCreate()
        BluetoothContext.set(this)
        AppExceptionHandle.getInstance().init(applicationContext, AppException())
        mwApplication = this
//        bluetoothSPP = BluetoothSPP(this)
    }


}